/*
 * @Author: lei.wang
 * @Date: 2023-10-26 16:23:07
 * @LastEditors: lei.wang
 * @LastEditTime: 2023-12-27 16:49:51
 * @Description:
 */

export const constantRoute = [
  {
    //登录
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    name: "login",
    meta: {
      name: "登录",
      hidden: true,
    },
  },
  {
    path: "/",
    component: () => import("@/layout/index.vue"),
    name: "layout",
    meta: {
      name: "",
      hidden: true,
      icon: ""
    },
    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          hidden: false,
          icon: 'HomeFilled'
        },
      },
    ],
  },
  {
    path: "/screen",
    component: () => import("@/views/screen/index.vue"),
    name: "Screen",
    meta: {
      hidden: false,
      title: "数据大屏",
      icon: 'Platform'
    },
  },
  {
    path: "/captcha",
    component: () => import("@/layout/index.vue"),
    name: "Captcha",
    meta: {
      hidden: false,
      title: "验证码演示",
      icon: 'Platform'
    },
    redirect: '/captcha/simple',
    children: [
      {
        path: "/captcha/simple",
        component: () => import("@/views/captcha/simplecaptcha/index.vue"),
        name: "SimpleCaptcha",
        meta: {
          title: "普通验证码",
          icon: "Management"
        },
      },
      {
        path: "/captcha/blockcaptcha",
        component: () => import("@/views/captcha/blockcaptcha/index.vue"),
        name: "BlockCaptcha",
        meta: {
          title: "滑块拼图验证码",
          icon: "Management"
        },
      },
      {
        path: "/captcha/clickworkdcaptcha",
        component: () => import("@/views/captcha/clickwordcaptcha/index.vue"),
        name: "ClickWordCaptcha",
        meta: {
          title: "点击文字验证码",
          icon: "Management"
        },
      },
    ]
  },
  {
    path: "/acl",
    component: () => import("@/layout/index.vue"),
    name: "Acl",
    meta: {
      title: "权限管理",
      icon: "Lock"
    },
    redirect: '/acl/user',
    children: [
      {
        path: "/acl/user",
        component: () => import("@/views/acl/user/index.vue"),
        name: "User",
        meta: {
          title: "用户管理",
          icon: "User"
        },
      },
      {
        path: "/acl/role",
        component: () => import("@/views/acl/role/index.vue"),
        meta: {
          title: "角色管理",
          icon: "UserFilled"
        },
      },
      {
        path: "/acl/permission",
        component: () => import("@/views/acl/permission/index.vue"),
        meta: {
          title: "权限管理",
          icon: "Monitor"
        },
      },
    ],
  },
  {
    //404
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404",
    meta: {
      hidden: true,
      title: "404",
      icon: 'DocumentDelete'
    },
  },
  {
    //404
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "Any",
    meta: {
      title: "任意路由",
      hidden: true,
      icon: 'DocumentDelete'
    },
  },
];
